<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML>
<html>
<head>
<title>My JSP 'searchresult.jsp' starting page</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link href="assets/ico/biologo.ico" rel="shortcut icon">
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap-popover.js"></script>
<script type="text/javascript" src="js/bootstrap-scrollspy.js"></script>

<style type="text/css">
body {
	background-image: url("");
	font-family: 方正静蕾简体; <%--
	font-family: HAKUYOGuiFanZi3500;
	font-family: 微软雅黑;
	--%>
}

#diseases {
	margin-top: 12px;
	margin-left: 20%;
	margin-right: 20%;
}

form {
	font-size: 16px;
}

#titlediv {
	margin-bottom: 0px;
}

.content {
	padding-left: 18px;
	background-color: #E8F5F7;
}

.add-on {
	font-size: 14px;
}

.form-actions {
	margin-right: 52%;
}

.scrollspy-example {
	height: 200px;
	overflow: auto;
	position: relative;
}
</style>
</head>
<body>
	<%@ include file="include/topbar.jsp"%>
	<%@ include file="main.jsp"%>

	
	<div id="diseases">
		<c:if test="${empty diseaseList}">
		您搜索的关键字还没相对应的疾病→→→→→→→→→→→→↑↑
	</c:if>
		<c:forEach var="disease" items="${diseaseList}">
			<div id="accordion2" class="accordion">
				<div class="accordion-group">
					<div class="accordion-heading">
						<a class="accordion-toggle" href="#collapse${disease.sn}"
							data-parent="#accordion2" data-toggle="collapse"> <%--<i class="icon-leaf"></i>--%>
							<i class="icon-certificate"></i>${disease.name }</a>
					</div>
					<div id="collapse${disease.sn}" class="accordion-body collapse in">
						<div class="accordion-inner">
							<!-- --------------------------↓↓↓↓↓↓↓↓↓↓标签的存放-------------------------- -->
							<div class="tabbable" style="margin-bottom: 18px;">
								<ul class="nav nav-tabs">
									<li class="active"><a data-toggle="tab"
										href="#tab${disease.sn}a">基本信息： </a></li>
									<li class=""><a data-toggle="tab"
										href="#tab${disease.sn}b">疾病的描述： </a></li>
									<li class=""><a data-toggle="tab"
										href="#tab${disease.sn}c">诊断的分类： </a></li>
									<li class=""><a data-toggle="tab"
										href="#tab${disease.sn}d">疾病的特征： </a></li>
								</ul>
								<div class="tab-content"
									style="padding-bottom: 9px; border-bottom: 1px solid #ddd;">
									<div id="tab${disease.sn}a" class="tab-pane active">
										疾病名称：${disease.name}<br /> 疾病的别名：${disease.alias}<br />
										疾病的缩写：${disease.abbreviation}<br /> 疾病的编号：${disease.code}<br />
										疾病的编辑者：${disease}<br /> 疾病的发生率:${disease.incidence}%<br />
										疾病的相对性：${disease.relativity}<br /> 疾病的平均值：${disease.avg1}<br />
										<i class="icon-edit"></i> <a
											href="editdisease.action?sn=${disease.sn}">编辑</a>
									</div>
									<div id="tab${disease.sn}b" class="tab-pane">
										疾病名称：${disease.name}<br /> 疾病1的详细描述:<i
											class="icon-certificate"></i>::

										<!-- 这是描述的一个标签 -->

										<div class="scrollspy-example" data-offset="0"
											data-target="#navbarExample${diseasesn}" data-spy="scroll"
											style="font-family: 方正静蕾简体;">${disease.description}</div>
									</div>
									<div id="tab${disease.sn}c" class="tab-pane">
										疾病1的诊断<br />
										<c:forEach var="testItem" items="${disease.testItems}"> 
											testItem的price:&nbsp;&nbsp;&nbsp;${testItem.price}-------------
											testItem对应的的sample_info(暂缺)---------：<br />
										</c:forEach>
										<!-- ----------------------------------------------------子标签---------------------------------------------------------------- -->
										<div class="tabbable tabs-left">
											<ul class="nav nav-tabs">
												<li class="active"><a data-toggle="tab"
													href="#l${disease.sn}AA">疾病病例 </a></li>
												<li class=""><a data-toggle="tab"
													href="#l${disease.sn}BB"> 2</a></li>
												<li class=""><a data-toggle="tab"
													href="#l${disease.sn}CC"> 3</a></li>
											</ul>
											<div class="tab-content">
												<div id="l${disease.sn}AA" class="tab-pane active">
													${disease}</div>
												<div id="l${disease.sn}BB" class="tab-pane">B.</div>
												<div id="l${disease.sn}CC" class="tab-pane">C.</div>
											</div>
										</div>
										<c:forEach var="sampleInfo" items="${testItem.sampleInfos}">
												病例测试的检验者：${sampleInfo.issue_time}<br />
												病例测试的sn的值：${sampleInfo.sn}<br />

										</c:forEach>
										<!-- -------------------------------------------------------新标签------------------------------------------------------- -->
										<%--testObject值→→→→→→→
										<c:if test="${empty disease.testObjects}">该病暂时还没有对应的基因酶学等！！！！</c:if>
										<br />
										<c:forEach var="testObject" items="${disease.testObjects }">
																testObject的值：：：${testObject.test_object }→→→→→${testObject.name}<br />
										</c:forEach>
									--%>
									</div>
									<div id="tab${disease.sn}d" class="tab-pane">
										<c:forEach var="diseaseKeyword"
											items="${disease.diseaseKeywords}">
										该疾病对应的关键字名称：${diseaseKeyword.name}对应的keyword——
										subcategoryde 范畴→→→${diseaseKeyword.keywordSubcategory.name}
										总属于→→→→→→
										${diseaseKeyword.keywordSubcategory.keywordCategory.name}
									</c:forEach>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- ----------------------------------------------------------------------------------------------------- -->
			<hr />
		</c:forEach>
	</div>
	<a href="toinsert.action">添加 </a>
</body>
<script type="text/javascript">
	$(".collapse").collapse();
	$('#navbar').scrollspy();

	$(function() {
		$(".btn-danger").click(function() {
			alert("sssss");
			$(".well").popover("show");
		});
		$(".disease_type").click(
				function() {
					$.post("disease_type.action", {
						"sn" : $(this).attr("rel")
					}, function(data) {
						//alert(data.diseaseCategory);
						//$("#diseaseTypevalue").show();
						$("#diseaseTypevalue" + data.diseaseCategory.sn)
								.toggle();
						$("#diseaseTypevalueSub" + data.diseaseCategory.sn)
								.text(data.diseaseCategory.name);
					});
				});
	});
</script>
</html>
